<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
    function page(n,s){
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchFormDict").submit();
        return false;
    }
    //    checkDate();
    //    function checkDate()
    //    {
    //        startDate = $("#startDate").val;
    //        stopDate = $("#stopDate").val;
    //        if(startDate != null && startDate !='')
    //        {
    //            stopDate >startDate;
    //        }
    //    }

</script>
<style>
    .title {
        line-height: 34px;
        display: inline-block;
        font-weight: bold;
    }


</style>
<div class="app">
    <section class="layout">
        <section class="main-content col-lg-4">
            <div class="content-wrap" id="leftCenterDiv">
                <div class="wrapper" style="bottom: 50px;">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/drug/drugImportMaster/query')">入库记录列表</a>
                        </li>
                    </ul>

                    <%--左侧药品字典列表--%>
                    <section class="panel panel-default">
                        <div class="panel-body">
                            <div class="table-responsive no-border">
                                <div class="datatable-top">
                                    <div class="pull-left">
                                        <%--处方查询--%>
                                        <form:form id="searchFormDict" modelAttribute="drugImportMaster"
                                                   onsubmit="return loadDivForm('mainCenterDiv','searchFormDict','${ctx}/drug/drugImportMaster/query');"
                                                   method="post" class="form-inline">
                                            <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                            <input id="pageSize" name="pageSize" type="hidden"
                                                   value="${page.pageSize}"/>
                                            <div class="col-sm-4 title">入库单号:</div>
                                            <div class="col-sm-8" style="margin-bottom: 10px">
                                                <form:input path="documentNo" htmlEscape="false" maxlength="50" class="form-control" /></div>
                                            <br><div class="col-sm-4 title">入库日期:</div>
                                            <div class="col-sm-8" style="margin-bottom: 10px">
                                                <form:input path="updateDateStr" id ="startDate"  htmlEscape="false" class="form-control Wdate" onfocus="WdatePicker({isShowClear:false,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" data-parsley-required="true"/></div>
                                            <br><div class="col-sm-4 title">至:</div><div class="col-sm-8" style="margin-bottom: 10px"><form:input path="createDateStr" id="stopDate"  htmlEscape="false" class="form-control Wdate" onfocus="WdatePicker({isShowClear:false,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" data-parsley-required="true"/></div>
                                            <input id="btnSubmit" class="btn btn-primary col-sm-12" type="submit" style="margin-left: 7.5px" value="查询"/>
                                        </form:form>
                                    </div>
                                </div>

                                <%--药品名称列表--%>
                                <div class="container-fluid">
                                    <table id="contentTable1" class="table table-bordered mg-t datatable">
                                        <thead>
                                        <tr>
                                            <th>应付款</th>
                                            <th>入库单号</th>
                                            <th>入库日期</th>
                                            <th>入库类别</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <c:forEach items="${page.list}" var="drugImportMaster">
                                        <tr>
                                        <tr onclick="loadDiv('rigthCenterDiv','${ctx}/drug/drugDetails/importdetail?masterId=${drugImportMaster.id}')">
                                            <td> ${drugImportMaster.accountReceivable}</td>
                                            <td> ${drugImportMaster.documentNo}</td>
                                            <td><fmt:formatDate value="${drugImportMaster.importDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                                            <td> ${drugImportMaster.importClass}</td>
                                        </tr>
                                        </c:forEach>
                                    </table>
                                    <div class="pagination">${page}</div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>

        <%--右侧药品规格字典列表--%>
        <section class="main-content col-lg-8">
            <div class="content-wrap" id="rigthCenterDiv">
                <div class="wrapper" style="bottom: 50px;">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a>入库记录详情</a>
                        </li>
                    </ul>
                </div>
            </div>
        </section>
    </section>
</div>

